package jfprincesstests.structures.negotiation;

import java.util.Arrays;
import java.util.List;

import jfprincesstests.fakes.FakeCondition;
import jfuzzyprincepless.agents.INegotiatingAgent;
import jfuzzyprincepless.algorithm.structure.IConstruction;
import jfuzzyprincepless.zarchive.algorithm.structure.ifcnstr.INegotiationCondition;
import jfuzzyprincepless.zarchive.algorithm.structure.ifcnstr.NegotiationAndCondition;
import laboratoryQ.junit.ignore.patch.BaseTestCase;

public class TestConditionsConstruction extends BaseTestCase {
	// TODOLONG: code with other condition constructions
	public void testAndCondition() {
		INegotiationCondition andCondition =
			new NegotiationAndCondition(
				new FakeCondition(0.9),
				new FakeCondition(0.51),
				new FakeCondition(0.1)
			);

		assertIsInstance(andCondition, IConstruction.class);

		List<INegotiatingAgent> agentsList =
			andCondition.getAgents();
		assertEquals(
			"[FCond.truth=0.9, FCond.truth=0.51, FCond.truth=0.1]",
			Arrays.toString(agentsList.toArray(INegotiatingAgent.EMPTY_ARRAY))
		);
	}
}
